<?php
/**
 * Created by PhpStorm.
 * User: hp
 * Date: 2019/2/25
 * Time: 15:33
 */

namespace App\Services\Company;

use App\Model\Company;
use App\Services\CommonService;

class CompanyService extends CommonService
{
    private $Company;
    public function __construct()
    {
        $this->Company=new Company();
    }

    public function companyShow($id){
        return $this->Company->findOne($id);
    }
    public function companyUpd($name,$address,$credit_code,$email,$guimo,$id,$image,$industry_id,$tag){
        $time=date('Y-m-d H:i:s',time());
        return $this->Company->updComp($name,$address,$credit_code,$email,$guimo,$id,$image,$industry_id,$tag,$time);
    }

    //wgr
    /*用户注册的同时添加公司信息*/
    public function addCompany($image,$name,$is_hot,$tag,$credit_code,$address,$created_at,$updated_at,$num)
    {
        return $this->Company->addCompany($image,$name,$is_hot,$tag,$credit_code,$address,$created_at,$updated_at,$num);
    }
}